using System;
using Mono.Fuse;
using Mono.Unix.Native;
using System.Collections;
using System.Collections.Generic;
using System.Threading;

namespace Mehat.San.SanFS
{

	public class DirectoryEntry : Mono.Fuse.DirectoryEntry, IDirectoryEntry
	{
		private IDirectory					mParent = null;			// Parent directory
		private string						mExternalPath = null;	// If real file then ext path to it

		public DirectoryEntry(ulong Inode, string Path, IDirectory Parent, Stat StatData)
			: base(System.IO.Path.GetFileName(Path))
		{
			mParent = Parent;
			base.Stat = StatData;
			base.Stat.st_ino = Inode;
			mExternalPath = Path;
		}


		/*
		 * Properties
		 */

		public IDirectory Parent
		{
			get { return mParent; }
			set
			{
				throw new Exception("Not implimented");
			}
		}

		public string ExternalPath
		{
			get { return mExternalPath; }
			set { mExternalPath = value; }
		}

		public new Stat Stat
		{
			get { return base.Stat; }
			set { base.Stat = value; }
		}
	}	// END CLASS
}	// END NAMESPACE
